/*
 * @Author: DUST
 * @Date: 2023-05-16 14:14:31
 * @LastEditors: DUST
 * @LastEditTime: 2023-11-27 13:41:48
 * @FilePath: \business-card-system\admin\src\main.ts
 * @Description: 
 * undefined
 */
import { createApp } from 'vue'
import './less/index.less'
// import './less/ant.less'
import App from "./App"

import "ant-design-vue/dist/antd.less";
import "ant-design-vue/dist/antd.variable.min.css";
const app = createApp(App);

// import { createPinia }  from "pinia";
// import piniaPersist from 'pinia-plugin-persist'
// const pinia  = createPinia();
// pinia.use(piniaPersist)
import store from "@/store";
// setupStore(app);
import router from "./router";

/**
 * @description: 自定义组件
 */
import adminPageTemplate from "./components/adminPageTemplate.vue";
import antTable from "./components/antTable.vue";
import tableTopBtns from "./components/tableTopBtns.vue";
import antModal from "./components/antModal.vue";
import browsePageTemplate from "./components/browsePageTemplate.vue";
import CIcon from "./components/CIcon.vue";
import browsePageList from "./components/browsePageList.vue";
import browsePageBanner from "@/components/browsePageBanner.vue";

app.component("AdminPageTemplate", adminPageTemplate)
.component("TableTopBtns", tableTopBtns)
.component("BrowsePageTemplate", browsePageTemplate)
.component("AntModal", antModal)
.component("browsePageList", browsePageList)
.component("CIcon", CIcon)
.component("browsePageBanner", browsePageBanner)
.component("AntTable", antTable);
// 代码块高亮显示
import Highlight from '@/utils/highlight';
import 'highlight.js/styles/atom-one-dark.css' //样式
//创建v-highlight全局指令
app.directive('highlight', Highlight)

// 图片加载失败显示
import defaultImg from "./utils/defaultImg";
app.directive("default-img", defaultImg);

import {
  Button,
  Menu,
  message,
  Table,
  Image,
  Modal,
  Form,
  Tag,
  List,
  Input,
  Select,
  Popconfirm,
  Drawer,
  Divider,
  InputNumber,
  Carousel,
  Spin,
  Breadcrumb,
  ConfigProvider,
  Upload,
  Dropdown
}  from "ant-design-vue";
message.config({
  maxCount: 1
});
import DatePicker from "ant-design-vue/es/date-picker/moment";

app
// .use(pinia)
.use(Button)
.use(Table)
.use(Image)
.use(Upload)
.use(Dropdown)
.use(Spin)
.use(Breadcrumb)
.use(Popconfirm)
.use(List)
.use(Drawer)
.use(Divider)
.use(Select)
.use(DatePicker)
.use(Modal)
.use(Carousel)
.use(Form)
.use(Tag)
.use(InputNumber)
.use(Input)
.use(ConfigProvider)
.use(Menu)
.use(router).mount('#app')
